package sk.naive.talker.command;

import sk.naive.talker.props.PropertyStoreException;
import sk.naive.talker.message.DefaultMessageFactory;
import sk.naive.talker.util.Utils;
import sk.naive.talker.Consts;

import java.rmi.RemoteException;

/**
 * SystemCommand.
 *
 * @author <a href="mailto:virgo@naive.deepblue.sk">Richard "Virgo" Richter</a>
 * @version $Revision: 1.3 $ $Date: 2005/02/22 22:29:31 $
 */
public class SystemCommand extends AbstractCommand {
	public void exec() throws CommandException, RemoteException, PropertyStoreException {
		Utils.checkPermission(user, Consts.PERM_SUPERUSER);
		ctxSet(DefaultMessageFactory.CTXKEY_VAL, getTalker().processSystemCommand(params));
		sendHelper().sendMessage(user, "systemCommand.result");
	}
}
